export const testLon = str=>/^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,18})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,18}|180)$/.test(str);
export const testLat = str=>/^(\-|\+)?([0-8]?\d{1}\.\d{0,18}|90\.0{0,18}|[0-8]?\d{1}|90)$/.test(str);

export const testInt = str=>/^[0-9]+$/.test(str); // 整型
export const testFloat = str=>/(^-?|^\+?|^\d?)\d*\.?\d+$/.test(str); // 浮点数字匹配
export const testNumber = str=>/^\d+(?=\.{0,1}\d+$|$)/.test(str); //正数类型